# --------------------list---------------------
def f1(my_list):
    print(f"my_listL {my_list} : 地址是{id(my_list)}")
    my_list[0] = "jack"
    print(f"my_listL {my_list} : 地址是{id(my_list)}")


my_list = ["tom", "jack", "lucy"]
print(f"my_listL {my_list} : 地址是{id(my_list)}")
f1(my_list)
print(f"my_listL {my_list} : 地址是{id(my_list)}")


# --------------------tuple---------------------
def f2(my_tuple):
    print(f"my_tupleL {my_tuple} : 地址是{id(my_tuple)}")
    # 不能修改元组
    # my_tuple[0] = "jack"
    print(f"my_tupleL {my_tuple} : 地址是{id(my_tuple)}")


my_tuple = ("tom", "jack", "lucy")
print(f"my_tupleL {my_tuple} : 地址是{id(my_tuple)}")
f2(my_tuple)
print(f"my_tupleL {my_tuple} : 地址是{id(my_tuple)}")


# --------------------set---------------------
def f3(my_set):
    print(f"my_setL {my_set} : 地址是{id(my_set)}")
    my_set.add("jack")
    print(f"my_setL {my_set} : 地址是{id(my_set)}")


my_set = {"tom", "jack", "lucy"}
print(f"my_setL {my_set} : 地址是{id(my_set)}")
f3(my_set)
print(f"my_setL {my_set} : 地址是{id(my_set)}")


# --------------------dict---------------------
def f4(my_dict):
    print(f"my_dictL {my_dict} : 地址是{id(my_dict)}")
    my_dict["name"] = "jack"
    print(f"my_dictL {my_dict} : 地址是{id(my_dict)}")


my_dict = {"name": "tom", "age": 18}
print(f"my_dictL {my_dict} : 地址是{id(my_dict)}")
